/*****************************************************************************\
* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      *
*                                                                             *
* This software is distributed under the terms of the GNU General Public      *
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   *
*                                                                             *
* In applying this licence, CERN does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization  *
* or submit itself to any jurisdiction.                                       *
\*****************************************************************************/
// $Id: TupleToolPid.h,v 1.4 2010-03-04 14:02:03 xieyu Exp $
#ifndef JBOREL_TUPLETOOLPID_H
#define JBOREL_TUPLETOOLPID_H 1

// Include files
// from Gaudi
#include "DecayTreeTupleBase/TupleToolBase.h"
#include "Kernel/IParticleTupleTool.h" // Interface

/** @class TupleToolPid TupleToolPid.h
 *
 * @brief DLL and PID information to be stored in a Tuple
 *
 * \sa DecayTreeTuple
 *
 * For all particles:
 * - head_ID : particleID().pid();
 *
 * For the long lived particles (isBasicParticle()).
 * - head_PIDe : LHCb::ProtoParticle::CombDLLe
 * - head_PIDmu : LHCb::ProtoParticle::CombDLLmu
 * - head_PIDK : LHCb::ProtoParticle::CombDLLk
 * - head_PIDp : LHCb::ProtoParticle::CombDLLp
 * - head_PIDd : LHCb::ProtoParticle::CombDLLd
 * - head_ProbNNe : LHCb::ProtoParticle::ProbNNe
 * - head_ProbNNk : LHCb::ProtoParticle::ProbNNk
 * - head_ProbNNp : LHCb::ProtoParticle::ProbNNp
 * - head_ProbNNpi : LHCb::ProtoParticle::ProbNNpi
 * - head_ProbNNmu : LHCb::ProtoParticle::ProbNNmu
 * - head_ProbNNd : LHCb::ProtoParticle::ProbNNd
 * - head_ProbNNghost : LHCb::ProtoParticle::ProbNNghost
 * - head_hasMuon
 * - head_isMuon
 * - head_UsedRichAerogel : richPID->usedAerogel()
 * - head_UsedRich1Gas : richPID->usedRich1Gas()
 * - head_UsedRich2Gas : richPID->usedRich2Gas()
 * - head_RichAboveElThres : richPID->electronHypoAboveThres()
 * - head_RichAboveMuThres : richPID->muonHypoAboveThres()
 * - head_RichAbovePiThres : richPID->pionHypoAboveThres()
 * - head_RichAboveKaThres : richPID->kaonHypoAboveThres()
 * - head_RichAbovePrThres : richPID->protonHypoAboveThres()
 * - head_hasCalo
 * If Verbose is true:
 * - head_RichDLLe : LHCb::ProtoParticle::RichDLLe
 * - head_RichDLLmu : LHCb::ProtoParticle::RichDLLmu
 * - head_RichDLLpi : LHCb::ProtoParticle::RichDLLpi
 * - head_RichDLLk : LHCb::ProtoParticle::RichDLLk
 * - head_RichDLLp : LHCb::ProtoParticle::RichDLLp
 * - head_RichDLLd : LHCb::ProtoParticle::RichDLLd
 * - head_RichDLLbt : LHCb::ProtoParticle::RichDLLbt
 * - head_InAccMuon : LHCb::ProtoParticle::InAccMuon
 * - head_isMuonLoose : muonPID->IsMuonLoose()
 * - head_isMuonTight : muonPID->IsMuonTight()
 * - head_MuonMuLL : muonPID->MuonLLMu()
 * - head_MuonBkgLL : muonPID->MuonLLBg()
 * - head_MuonNShared : muonPID->nShared()
 * - head_MuonChi2Corr : muonPID->chi2Corr()
 * - head_InAccEcal : LHCb::ProtoParticle::InAccEcal
 * - head_CaloEcalE : LHCb::ProtoParticle::CaloEcalE
 * - head_EcalPIDe : LHCb::ProtoParticle::EcalPIDe
 * - head_EcalPIDmu : LHCb::ProtoParticle::EcalPIDmu
 * - head_InAccHcal : LHCb::ProtoParticle::InAccHcal
 * - head_CaloHcalE : LHCb::ProtoParticle::CaloHcalE
 * - head_HcalPIDe : LHCb::ProtoParticle::HcalPIDe
 * - head_HcalPIDmu : LHCb::ProtoParticle::HcalPIDmu
 * - head_InAccPrs : LHCb::ProtoParticle::InAccPrs
 * - head_PrsPIDe : LHCb::ProtoParticle::PrsPIDe
 * - head_CaloPrsE : LHCb::ProtoParticle::CaloPrsE
 * - head_InAccSpd : LHCb::ProtoParticle::InAccSpd
 * - head_CaloSpdE : LHCb::ProtoParticle::CaloSpdE
 * - head_InAccBrem : LHCb::ProtoParticle::InAccBrem
 * - head_BremPIDe : LHCb::ProtoParticle::BremPIDe
 * - head_VeloCharge : LHCb::ProtoParticle::VeloCharge
 *
 *  @author Jeremie Borel
 *  @date   2007-11-07
 *
 * Add more info:
 * -hasRich:  proto->richPID()!=0
 * -hasCalo:  proto->calo().size()>0
 * -hasMuon:  proto->muonPID()!=0
 * -isMuon:   proto->muonPID->IsMuon()
 *
 *  @date   2010-03-04
 */
class TupleToolPid : public TupleToolBase, virtual public IParticleTupleTool {

public:
  /// Standard constructor
  TupleToolPid( const std::string& type, const std::string& name, const IInterface* parent );

  virtual ~TupleToolPid(){}; ///< Destructor

  StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& ) override;
};

#endif // JBOREL_TUPLETOOLPID_H
